<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="lijinbo" />
    <title>149-漂亮的Tooltip文字提示效果</title>
    <style>
      .wrapper {
        background: #ececec;
        position: relative;
        text-align: center;
        margin: 100px;
        width: 200px;
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 20px;
      }
      .tooltip {
        position: absolute;
        bottom: 100%;
        background: #1496bb;
        padding-top: 10px;
        padding-bottom: 10px;
        width: 100%;
        margin-bottom: 15px;
        color: #fff;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease-out;
        box-shadow: 2px 2px 6px rgba(0, 0, 0.28);
      }
      .tooltip:after {
        content: '';
        border: solid;
        position: absolute;
        left: 50%;
        top: 100%;
        border-width: 5px;
        border-color: #1496bb transparent transparent transparent;
      }

      .wrapper:hover .tooltip {
        opacity: 1;
        transform: translateY(0px);
      }
    </style>
  </head>

  <body>
    <div class="wrapper">
      I have a tool
      <div class="tooltip">这只是一个提示框</div>
    </div>
  </body>
</html>
